#include<bits/stdc++.h>
#define ll long long
#define ld long double
using namespace std;

const int N = 20, INF = 0x3f3f3f3f;

int n;
ld dp[N][1 << 16], a[N][N], ans = INF;
pair<ld, ld> p[N];

ld dis(int x1, int x2) { return sqrt(pow(p[x1].first - p[x2].first, 2) + pow(p[x1].second - p[x2].second, 2)); }

void dfs(int cnt, int pre, int state, ld sum)
{
    if (cnt == n + 1) {
        ans = min(ans, sum);
        return;
    }

    for (int i = 1; i <= n; i++) {
        if (state & (1 << (i - 1))) continue;
        int t = state + (1 << (i - 1));
        if (dp[i][t] == 0 || dp[i][t] > dp[pre][state] + a[pre][i]) {
            dp[i][t] = dp[pre][state] + a[pre][i];
            dfs(cnt + 1, i, t, sum + a[pre][i]);
        }
    }
}

int main()
{
    cin >> n;
    for (int i = 1; i <= n; i++)
        cin >> p[i].first >> p[i].second;

    for (int i = 0; i <= n; i++)
        for (int j = 0; j <= n; j++)
            a[j][i] = a[i][j] = dis(i, j);

    dfs(1, 0, 0, 0);
    cout << fixed << setprecision(2) << ans;
}